@extends('admin.common.base-master')

@section('html-head')

@endsection

@section('html-body')
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">用户管理</a>
        </div>

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>头像</th>
                    <th>昵称</th>
                    <th>真实姓名</th>
                    <th>性别</th>
                    <th>QQ</th>
                    <th>地区</th>
                    <th>微信号</th>
                    <th>菠萝币</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @if(count($users) > 0)
                    @foreach($users as $user)
                        <tr id="user_{{$user->id}}">
                            <td>{{$user->id}}</td>
                            <td class="account-td" style="width: 5%;">
                                <span class="photo" style="border-radius: 100%;display:initial">
                                    <img src="{{route('Api.Image.showPhotoByUserid',['id'=>$user?$user->id:0])}}" alt="">
                                </span>
                            </td>
                            <td>@if($user->userinfo){{$user->userinfo->nickname}}@endif</td>
                            <td>@if($user->userinfo){{$user->userinfo->realname}}@endif</td>
                            <td>@if($user->userinfo && $user->userinfo->sex == 1)男 @elseif($user->userinfo && $user->userinfo->sex == 2)女 @else未知 @endif</td>
                            <td>@if($user->userinfo){{$user->userinfo->qq}}@endif</td>
                            <td>@if($user->userinfo){{$user->userinfo->province}}{{$user->userinfo->city}}{{$user->userinfo->area}}@endif</td>
                            <td>@if($user->userinfo){{$user->userinfo->wechat}}@endif</td>
                            <td>@if($user->userinfo){{$user->userinfo->coin}}@endif</td>
                            <td>
                                <a href="javascript:void(0);" class="close" data-id="">@if($user->status == 0 || $user->status == 1)<span style="color: #515454">锁定</span> @else <span style="color: #961212">解锁</span> @endif</a>
                            </td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
                <tfoot class="order-gl">

                </tfoot>
            </table>
<!--            --><?php //echo $user->appends([])->render(); ?>
            <?php echo $users->render(); ?>
        </div>
    </div>
    <script>
        $(function () {

        });
    </script>
@endsection